﻿<?php
$srcString='欢迎来到hangge.com。航歌，做最好的开放者知识平台。欢迎来到hangge.com。航歌，做最好的开放者知识平台。欢迎来到hangge.com。航歌，做最好的开放者知识平台。欢迎来到hangge.com。';  
$srcCompress=base64_encode(gzencode($srcString,9));  
echo strlen($srcCompress).'---压缩后字符串长度<br/>';  
echo $srcCompress.'<br/>';
$newString=base64_decode($srcCompress);  
$newString=gzdecode($newString);  
echo $newString.'----解压后原字符串<br/>'; 

//from golang
$sFromGolang = base64_decode('H4sIAAAJbogE/3q2ZtGL/X3P5i592rEhIzEvPT1VLzk/93FD04uOVc/W9rzf0/O0cdazOQ1Pl+59Pqvl6Z6GZ1P2vWhofT5/6Yv1bU93bn7avwGoeEiYAgAAAP//AQAA//+fDnsm6wAAAA==');
$sFromGolang = gzdecode($sFromGolang);
echo $sFromGolang.'----fromGolang<br/>'; 

//from swifty
$sFromSwifty = base64_decode('H4sIAAAAAAAAA3u2ZtGL/X3P5i592rEhIzEvPT1VLzk/93FD04uOVc/W9rzf0/O0cdazOQ1Pl+59Pqvl6Z6GZ1P2vWhofT5/6Yv1bU93bn7avwGo+NlQMAUAnw57JusAAAA=');
$sFromSwifty = gzdecode($sFromSwifty);
echo $sFromSwifty.'----sFromSwifty<br/>'; 

//from python
$sFromPython = base64_decode('H4sIALrIO1cC/3u2ZtGL/X3P5i592rEhIzEvPT1VLzk/93FD04uOVc/W9rzf0/O0cdazOQ1Pl+59Pqvl6Z6GZ1P2vWhofT5/6Yv1bU93bn7avwGo+NlQMAUAnw57JusAAAA=');
$sFromPython = gzdecode($sFromPython);
echo $sFromPython.'----sFromPython<br/>'; 

//from pascal
$sFromPascal = base64_decode('H4sICAAAAAAAAAB7tmbRi/19z+YufdqxISMxLz09VS85P/dxQ9OLjlXP1va839PztHHWszkNT5fufT6r5emehmdT9r1oaH0+f+mL9W1Pd25+2r8BqPjZUDAFAJ8OeybrAAAA');
$sFromPascal = gzdecode($sFromPascal);
echo $sFromPascal.'----sFromPascal<br/>'; 



?>